// Copyright 2010 Alexandre Tristan St-Cyr <tristan.stcyr@gmail.com>

package com.codeplex.loadjava;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class SQLServerConnectionFactory implements ISQLConnectionFactory {
	
	@Override
	public Connection createConnection(String server, String database, String username, String password) 
		throws SQLException, ClassNotFoundException
	{
		Class.forName("net.sourceforge.jtds.jdbc.Driver");
		Connection connection = DriverManager.getConnection(
				"jdbc:jtds:sqlserver://"+server+"/"+database, username, password);
		return connection;
	}
}
